package com.ccx.demo.dao;

import com.ccx.demo.pojo.SysRole;
import com.ccx.demo.pojo.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserDao {

    SysUser SelectUsernameByName(String username);

    String SelectPassword(String username);

    SysRole SelectRole(@Param("userId") int userId);

    List<String> selectIdAuthority(@Param("id") int id);

    boolean addUser(SysUser user);
//   添加用户对应角色
    boolean addUserRole(@Param("user_id") Integer user_id,@Param("role_id") Integer role_id);

    List<SysUser> QueryAll();

    List<SysRole> QueryByRole();

    boolean DelById(Integer id);
}
